class SweetPotato:
    def __init__(self):
        self.time=0
        self.status='生的'
        self.condiment=[]
    def cook(self,time):
        self.time+=time
        if(3>self.time>=0):
            self.status='生的'
        elif(5>self.time>=3):
            self.status='半生不熟'
        elif (8 > self.time >=5):
            self.status = '熟的'
        elif(self.time>=8):
            self.status = '烤糊了'
    def add(self,condiment):
        if condiment not in self.condiment:
         self.condiment.append(condiment)
    def __str__(self):
        return (f'你考的时间是{self.time}分钟,状态是{self.status},添加的调料有{self.condiment}')

if __name__=='__main__':
 po=SweetPotato()
 po.add('白砂糖')
 po.cook(2)
 print(po)
 po.add('白砂糖')
 po.cook(4)
 print(po)